<?php

namespace App\Service;

use App\Models\FeedbackModel;

class FeedbackService
{
    public function commit($params)
    {
        $params = [
            'user_id' => isset($params['userId']) ? $params['userId'] : 0,
            'content' => isset($params['content']) ? $params['content'] : '',
            'resource_ids' => isset($params['resourceIds']) ? implode(',',$params['resourceIds']) :'',
            'status' => isset($params['status']) ? $params['status'] : 1,
        ];
        return FeedbackModel::commit($params);
    }
}
